%Correction for Local Solar Time to IST
%latest date 16.1.2006
load c:\manoj\m\eej\30oct05;
load c:\manoj\geomag\data\hyb02h;
ETTMNHYB = ETTDELTA-HYBDELTA;
ettmnhyb = reshape(ETTMNHYB',[1,1096*24]);
TIRDLTA = reshape(TIRDELTA',[1,731*24]); %OOPS the ' is VERY important
TIRDLTA(end+1:26304) = NaN;
ABGDLTA = reshape(ABGDELTA',[1,1096*24]);
data1 = load('c:\manoj\projects\eej\eejdata.txt');
timestamp = data1(:,1);
%ABG Long = 72.87, Allahabad (IST) 82.5, TIR 77.82
abgcor = ((72.87-82.5)/15)/24;
tircor = ((77.82-82.5)/15)/24;

% abgcor = ((75-82.5)/15)/24; %This is as both the observatories do not fall in same longitude, data are corrected to a mean (72 and 77) longitude
% tircor = ((75-82.5)/15)/24;

abgtime = timestamp+abgcor;
tirtime = timestamp+tircor;

%corrected difference

tirmnabg_cor = TIRDLTA-interp1(abgtime,ABGDLTA,tirtime,'linear')';

save c:\manoj\m\eej\17Jan06

